﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;

namespace ArcGisMapDesktop.Common
{
    public class MD5Helper
    {
        public static string GetMD5Encode(string str)
        {
            byte[] result = Encoding.Default.GetBytes(str);    //tbPass为输入密码的文本框  
            MD5 md5 = new MD5CryptoServiceProvider();
            byte[] output = md5.ComputeHash(result);
            string md5Str = BitConverter.ToString(output).Replace("-", "");
            return md5Str;
        }
    }
}
